3.17 \(\int \frac{A+B x^n+C x^{2 n}+D x^{3 n}}{(a+b x^n+c x^{2 n})^2} \, dx\)

Optimal. Leaf size=494 \[ \frac{x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right ) \left (\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (-2 b c (a D (n+2)+B c n)+4 a c^2 C-b^2 c C (1-n)+b^3 D\right )}{\sqrt{b^2-4 a c}}-b c (1-n) (a C+A c)+a b^2 D+2 a c (B c (1-n)-a D (n+1))\right )}{a c n \left (b^2-4 a c\right ) \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right ) \left (-\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (-2 b c (a D (n+2)+B c n)+4 a c^2 C-b^2 c C (1-n)+b^3 D\right )}{\sqrt{b^2-4 a c}}-b c (1-n) (a C+A c)+a b^2 D+2 a c (B c (1-n)-a D (n+1))\right )}{a c n \left (b^2-4 a c\right ) \left (\sqrt{b^2-4 a c}+b\right )}+\frac{x \left (x^n \left (b c (a C+A c)-a b^2 D-2 a c (B c-a D)\right )+A c \left (b^2-2 a c\right )-a (a b D-2 a c C+b B c)\right )}{a c n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

[Out]

(x*(A*c*(b^2 - 2*a*c) - a*(b*B*c - 2*a*c*C + a*b*D) + (b*c*(A*c + a*C) - a*b^2*D - 2*a*c*(B*c - a*D))*x^n))/(a
*c*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) + ((a*b^2*D - b*c*(A*c + a*C)*(1 - n) + 2*a*c*(B*c*(1 - n) - a*D*(
1 + n)) + (A*c^2*(4*a*c*(1 - 2*n) - b^2*(1 - n)) - a*(4*a*c^2*C + b^3*D - b^2*c*C*(1 - n) - 2*b*c*(B*c*n + a*D
*(2 + n))))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])
/(a*c*(b^2 - 4*a*c)*(b - Sqrt[b^2 - 4*a*c])*n) + ((a*b^2*D - b*c*(A*c + a*C)*(1 - n) + 2*a*c*(B*c*(1 - n) - a*
D*(1 + n)) - (A*c^2*(4*a*c*(1 - 2*n) - b^2*(1 - n)) - a*(4*a*c^2*C + b^3*D - b^2*c*C*(1 - n) - 2*b*c*(B*c*n +
a*D*(2 + n))))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]
)])/(a*c*(b^2 - 4*a*c)*(b + Sqrt[b^2 - 4*a*c])*n)

________________________________________________________________________________________

Rubi [A]  time = 1.58409, antiderivative size = 494, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.079, Rules used = {1794, 1422, 245} \[ \frac{x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right ) \left (\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (-2 b c (a D (n+2)+B c n)+4 a c^2 C-b^2 c C (1-n)+b^3 D\right )}{\sqrt{b^2-4 a c}}-b c (1-n) (a C+A c)+a b^2 D+2 a c (B c (1-n)-a D (n+1))\right )}{a c n \left (b^2-4 a c\right ) \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right ) \left (-\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (-2 b c (a D (n+2)+B c n)+4 a c^2 C-b^2 c C (1-n)+b^3 D\right )}{\sqrt{b^2-4 a c}}-b c (1-n) (a C+A c)+a b^2 D+2 a c (B c (1-n)-a D (n+1))\right )}{a c n \left (b^2-4 a c\right ) \left (\sqrt{b^2-4 a c}+b\right )}+\frac{x \left (x^n \left (b c (a C+A c)-a b^2 D-2 a c (B c-a D)\right )+A c \left (b^2-2 a c\right )-a (a b D-2 a c C+b B c)\right )}{a c n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x^n + C*x^(2*n) + D*x^(3*n))/(a + b*x^n + c*x^(2*n))^2,x]

[Out]

(x*(A*c*(b^2 - 2*a*c) - a*(b*B*c - 2*a*c*C + a*b*D) + (b*c*(A*c + a*C) - a*b^2*D - 2*a*c*(B*c - a*D))*x^n))/(a
*c*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) + ((a*b^2*D - b*c*(A*c + a*C)*(1 - n) + 2*a*c*(B*c*(1 - n) - a*D*(
1 + n)) + (A*c^2*(4*a*c*(1 - 2*n) - b^2*(1 - n)) - a*(4*a*c^2*C + b^3*D - b^2*c*C*(1 - n) - 2*b*c*(B*c*n + a*D
*(2 + n))))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])
/(a*c*(b^2 - 4*a*c)*(b - Sqrt[b^2 - 4*a*c])*n) + ((a*b^2*D - b*c*(A*c + a*C)*(1 - n) + 2*a*c*(B*c*(1 - n) - a*
D*(1 + n)) - (A*c^2*(4*a*c*(1 - 2*n) - b^2*(1 - n)) - a*(4*a*c^2*C + b^3*D - b^2*c*C*(1 - n) - 2*b*c*(B*c*n +
a*D*(2 + n))))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]
)])/(a*c*(b^2 - 4*a*c)*(b + Sqrt[b^2 - 4*a*c])*n)

Rule 1794

Int[(P3_)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_), x_Symbol] :> With[{d = Coeff[P3, x^n, 0], e = Coef
f[P3, x^n, 1], f = Coeff[P3, x^n, 2], g = Coeff[P3, x^n, 3]}, -Simp[(x*(b^2*c*d - 2*a*c*(c*d - a*f) - a*b*(c*e
 + a*g) + (b*c*(c*d + a*f) - a*b^2*g - 2*a*c*(c*e - a*g))*x^n)*(a + b*x^n + c*x^(2*n))^(p + 1))/(a*c*n*(p + 1)
*(b^2 - 4*a*c)), x] - Dist[1/(a*c*n*(p + 1)*(b^2 - 4*a*c)), Int[(a + b*x^n + c*x^(2*n))^(p + 1)*Simp[a*b*(c*e
+ a*g) - b^2*c*d*(n + n*p + 1) - 2*a*c*(a*f - c*d*(2*n*(p + 1) + 1)) + (a*b^2*g*(n*(p + 2) + 1) - b*c*(c*d + a
*f)*(n*(2*p + 3) + 1) - 2*a*c*(a*g*(n + 1) - c*e*(n*(2*p + 3) + 1)))*x^n, x], x], x]] /; FreeQ[{a, b, c, n}, x
] && EqQ[n2, 2*n] && PolyQ[P3, x^n, 3] && NeQ[b^2 - 4*a*c, 0] && ILtQ[p, -1]

Rule 1422

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{A+B x^n+C x^{2 n}+D x^{3 n}}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx &=\frac{x \left (A c \left (b^2-2 a c\right )-a (b B c-2 a c C+a b D)+\left (b c (A c+a C)-a b^2 D-2 a c (B c-a D)\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac{\int \frac{a b (B c+a D)-2 a c (a C-A c (1-2 n))-A b^2 c (1-n)+\left (a b^2 D-b c (A c+a C) (1-n)+2 a c (B c (1-n)-a D (1+n))\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{a c \left (b^2-4 a c\right ) n}\\ &=\frac{x \left (A c \left (b^2-2 a c\right )-a (b B c-2 a c C+a b D)+\left (b c (A c+a C)-a b^2 D-2 a c (B c-a D)\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac{\left (a b^2 D-b c (A c+a C) (1-n)+2 a c (B c (1-n)-a D (1+n))-\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (4 a c^2 C+b^3 D-b^2 c C (1-n)-2 b c (B c n+a D (2+n))\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a c \left (b^2-4 a c\right ) n}+\frac{\left (a b^2 D-b c (A c+a C) (1-n)+2 a c (B c (1-n)-a D (1+n))+\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (4 a c^2 C+b^3 D-b^2 c C (1-n)-2 b c (B c n+a D (2+n))\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a c \left (b^2-4 a c\right ) n}\\ &=\frac{x \left (A c \left (b^2-2 a c\right )-a (b B c-2 a c C+a b D)+\left (b c (A c+a C)-a b^2 D-2 a c (B c-a D)\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac{\left (a b^2 D-b c (A c+a C) (1-n)+2 a c (B c (1-n)-a D (1+n))+\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (4 a c^2 C+b^3 D-b^2 c C (1-n)-2 b c (B c n+a D (2+n))\right )}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b-\sqrt{b^2-4 a c}\right ) n}+\frac{\left (a b^2 D-b c (A c+a C) (1-n)+2 a c (B c (1-n)-a D (1+n))-\frac{A c^2 \left (4 a c (1-2 n)-b^2 (1-n)\right )-a \left (4 a c^2 C+b^3 D-b^2 c C (1-n)-2 b c (B c n+a D (2+n))\right )}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b+\sqrt{b^2-4 a c}\right ) n}\\ \end{align*}

Mathematica [B]  time = 4.94864, size = 2402, normalized size = 4.86 \[ \text{Result too large to show} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^n + C*x^(2*n) + D*x^(3*n))/(a + b*x^n + c*x^(2*n))^2,x]

[Out]

-((x*((b^2 - 4*a*c)*(-b + Sqrt[b^2 - 4*a*c])*(b + Sqrt[b^2 - 4*a*c])*(1 + n)*(-(A*c*(b^2 - 2*a*c + b*c*x^n)) +
 a*(2*B*c^2*x^n + b^2*D*x^n + b*(B*c + a*D - c*C*x^n) - 2*a*c*(C + D*x^n))) + 2*A*b*c^3*Sqrt[b^2 - 4*a*c]*x^n*
(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b +
Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sq
rt[b^2 - 4*a*c])]) - 4*a*B*c^3*Sqrt[b^2 - 4*a*c]*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeome
tric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 2*a*b*c^2*Sqrt[b^2 - 4*a*c]*C*x^n*(a
 + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt
[b^2 - 4*a*c])]) - 2*a*b^2*c*Sqrt[b^2 - 4*a*c]*D*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeome
tric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 4*a^2*c^2*Sqrt[b^2 - 4*a*c]*D*x^n*(a
 + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt
[b^2 - 4*a*c])]) - 2*A*b*c^3*Sqrt[b^2 - 4*a*c]*n*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeome
tric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 4*a*B*c^3*Sqrt[b^2 - 4*a*c]*n*x^n*(a
 + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt
[b^2 - 4*a*c])]) - 2*a*b*c^2*Sqrt[b^2 - 4*a*c]*C*n*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hyperg
eometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 4*a^2*c^2*Sqrt[b^2 - 4*a*c]*D*n*x^
n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b
+ Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b +
Sqrt[b^2 - 4*a*c])]) + 2*A*b^2*c^2*Sqrt[b^2 - 4*a*c]*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*
Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hyperg
eometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 2*a*b*B*c^2*Sqrt[b^2 - 4*a*c]*(1 + n
)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2
 - 4*a*c])]) - 4*a*A*c^3*Sqrt[b^2 - 4*a*c]*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeome
tric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F
1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 4*a^2*c^2*Sqrt[b^2 - 4*a*c]*C*(1 + n)*(a + x^n
*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4
*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])
]) - 2*a^2*b*c*Sqrt[b^2 - 4*a*c]*D*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[
1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(
-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 2*A*b^2*c^2*Sqrt[b^2 - 4*a*c]*n*(1 + n)*(a + x^n*(b +
c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])
]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 8
*a*A*c^3*Sqrt[b^2 - 4*a*c]*n*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(
-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1
 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])))/(a*c*(b^2 - 4*a*c)^2*(-b + Sqrt[b^2 - 4*a*c])*(b + Sqrt[b^2
- 4*a*c])*n*(1 + n)*(a + x^n*(b + c*x^n))))

________________________________________________________________________________________

Maple [F]  time = 0.024, size = 0, normalized size = 0. \begin{align*} \int{\frac{A+B{x}^{n}+C{x}^{2\,n}+D{x}^{3\,n}}{ \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*x^n+C*x^(2*n)+D*x^(3*n))/(a+b*x^n+c*x^(2*n))^2,x)

[Out]

int((A+B*x^n+C*x^(2*n)+D*x^(3*n))/(a+b*x^n+c*x^(2*n))^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (C a b c - 2 \, B a c^{2} + A b c^{2} -{\left (a b^{2} - 2 \, a^{2} c\right )} D\right )} x x^{n} -{\left (D a^{2} b - 2 \, C a^{2} c + B a b c -{\left (b^{2} c - 2 \, a c^{2}\right )} A\right )} x}{a^{2} b^{2} c n - 4 \, a^{3} c^{2} n +{\left (a b^{2} c^{2} n - 4 \, a^{2} c^{3} n\right )} x^{2 \, n} +{\left (a b^{3} c n - 4 \, a^{2} b c^{2} n\right )} x^{n}} - \int -\frac{D a^{2} b - 2 \, C a^{2} c + B a b c -{\left (2 \, a c^{2}{\left (2 \, n - 1\right )} - b^{2} c{\left (n - 1\right )}\right )} A +{\left (C a b c{\left (n - 1\right )} - 2 \, B a c^{2}{\left (n - 1\right )} + A b c^{2}{\left (n - 1\right )} -{\left (2 \, a^{2} c{\left (n + 1\right )} - a b^{2}\right )} D\right )} x^{n}}{a^{2} b^{2} c n - 4 \, a^{3} c^{2} n +{\left (a b^{2} c^{2} n - 4 \, a^{2} c^{3} n\right )} x^{2 \, n} +{\left (a b^{3} c n - 4 \, a^{2} b c^{2} n\right )} x^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*x^n+C*x^(2*n)+D*x^(3*n))/(a+b*x^n+c*x^(2*n))^2,x, algorithm="maxima")

[Out]

((C*a*b*c - 2*B*a*c^2 + A*b*c^2 - (a*b^2 - 2*a^2*c)*D)*x*x^n - (D*a^2*b - 2*C*a^2*c + B*a*b*c - (b^2*c - 2*a*c
^2)*A)*x)/(a^2*b^2*c*n - 4*a^3*c^2*n + (a*b^2*c^2*n - 4*a^2*c^3*n)*x^(2*n) + (a*b^3*c*n - 4*a^2*b*c^2*n)*x^n)
- integrate(-(D*a^2*b - 2*C*a^2*c + B*a*b*c - (2*a*c^2*(2*n - 1) - b^2*c*(n - 1))*A + (C*a*b*c*(n - 1) - 2*B*a
*c^2*(n - 1) + A*b*c^2*(n - 1) - (2*a^2*c*(n + 1) - a*b^2)*D)*x^n)/(a^2*b^2*c*n - 4*a^3*c^2*n + (a*b^2*c^2*n -
 4*a^2*c^3*n)*x^(2*n) + (a*b^3*c*n - 4*a^2*b*c^2*n)*x^n), x)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*x^n+C*x^(2*n)+D*x^(3*n))/(a+b*x^n+c*x^(2*n))^2,x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*x**n+C*x**(2*n)+D*x**(3*n))/(a+b*x**n+c*x**(2*n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{D x^{3 \, n} + C x^{2 \, n} + B x^{n} + A}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*x^n+C*x^(2*n)+D*x^(3*n))/(a+b*x^n+c*x^(2*n))^2,x, algorithm="giac")

[Out]

integrate((D*x^(3*n) + C*x^(2*n) + B*x^n + A)/(c*x^(2*n) + b*x^n + a)^2, x)